package net.huashitong.oversee.dao;

import com.sirdc.modules.core.dao.GenericQuery;
import com.sirdc.modules.core.dao.StringDao;
import net.huashitong.oversee.entity.TaskRecord;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class TaskRecordDao extends StringDao<TaskRecord> {

    /**
     * 任务id 获取所有完成情况
     * @param taskid
     * @return
     */
        public List<TaskRecord> getResDeptRecordsbyId(String taskid)
        {
            GenericQuery query  = createQuery("t");
            query.append(" and t.taskId=:taskId").setParam("taskId",taskid);
            query.append(" ORDER BY t.createDate desc");
            return query.listResult();
        }
}
